#! /bin/sh
#
set -x

nt=300 dt=0.004 ft=0.0  nxm=150 dxm=0.01 fxm=0.0 dxo=0 nxo=1 fxo=0.0
fpeak=20 ls=0 dvdx=0.2 dvdz=0.5 ndpfz=5 v00=2.0 
pert=0 ob=1 er=0

DIR=.
output=$DIR/rawdatafd.su
migdata=$DIR/datamigfd.su
vfile=$DIR/vfile

susynlv nt=$nt dt=$dt ft=$ft fpeak=$fpeak ls=1 verbose=1 smooth=0\
	nxm=$nxm dxm=$dxm fxm=$fxm dvdx=$dvdx dvdz=$dvdz v00=$v00\
        ref="1:0.3,0.3;0.6,0.3" \
	ref="1:0.3,0.5;0.6,0.6" >$output


suximage < $output n1=$nt d1=$dt n2=$nxm d2=$dxm f2=$fxm\
        label1="Traveltime (s)" label2="Midpoint (km)"\
	title="Zero-offset section dx=10m" perc=99.5 &

makevel nx=150 nz=100 dvdx=.2  dvdz=.5 dx=.01 dz=.01 > $vfile.orig


transp < $vfile.orig n1=150 > $vfile


sumigfd < $output nz=100 dz=0.01 vfile=$vfile >$migdata 

suximage <$migdata f1=0 d1=0.01 f2=0 d2=0.01 perc=99.9 \
label1="Depth (km)" label2="Midpoint (km)" \
title="Migrated section using FD" &

#rm -rf $output $migdata $genv $vfile

exit

